fix(web): scroll terminal output with touch gestures - #11305
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized terminal interaction fix that adds touch scrolling while reusing existing wheel, alternate-screen, mouse-tracking, and link behavior. The focused tests cover the new gesture states, and no production configuration, schema, security, billing, or static-analysis settings are changed. Notes:
No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
d62b7a1 to
f23f7ba
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe terminal surface now supports touch drag scrolling and touch-aware link and mouse-reporting behavior. Wheel and touch scrolling share one dispatch path. Terminal panes activate on pointer-down. Tests cover touch gestures and cancellation. ChangesTerminal touch support
Priority: ⬆️ High Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: High Sequence Diagram(s)sequenceDiagram
participant TouchPointer
participant GhosttySurface
participant TerminalState
TouchPointer->>GhosttySurface: pointerdown
GhosttySurface->>GhosttySurface: capture primary touch
TouchPointer->>GhosttySurface: pointermove
GhosttySurface->>TerminalState: scrollRows
TouchPointer->>GhosttySurface: pointerup
GhosttySurface->>TerminalState: activate link or report mouse event
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Touch scrolling preserves gesture ownership and the reviewed behavior is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
f23f7ba to
f93204e
Compare
Closes #2141
Touch drags in the web terminal selected text instead of scrolling, leaving mobile browsers stuck at the newest output in #2141.
Route vertical touch drags through the terminal's existing wheel behavior. Scrollback moves in both directions, full-screen programs receive their existing scroll input, and taps still focus the terminal or open links. Pointer activation also selects the touched split pane.
59 focused terminal tests and web typecheck pass. Four new touch cases fail on the baseline; scoped lint reports seven existing drawer warnings. In the isolated Chromium client, the same gesture changes scrollback from 87 to 77 and back to 87 after the fix; it stays at 87 before. Tapping an inactive split selects and focuses it. Physical iOS/Android browsers, native mobile, and remote/relay sessions were not exercised. Web and desktop share this terminal; native mobile uses a separate client. There are no provider, wire-contract, or settings changes.
Rebased onto main, which includes the device-ticket correction from #11304.
Before:
After:
Touch scrolling in both directions:
t3-2141-touch-scroll.mp4
Model: GPT-6. Harness: Codex in T3 Code.
Rebased on main
20363c32c9bfdbf49c2716ef11d1f18483fcc01b. Scoped validation rerun after rebasing; existing native and human review limits remain.Summary by CodeRabbit
New Features
Bug Fixes